<?php
/*
 * Include the configuration info
 * 
 */
include_once '../sys/config/db_cred.php';

/**
 * 
 * Define the constants for configuration info
 * 
 */
foreach ($C as $name => $val) 
{
    define($name, $val);
} 

/**
 * 
 * Create a PDO object
 * 
 * 
 */
$dbn = "mysql:host=" . DB_HOST . ";dbname=" . DB_NAME;
$dbo = new PDO($dbn, DB_USER, DB_PASS);

/**
 * 
 * Define auto -load function for classes
 * 
 */
function __autoload($class)
{
    $filename = "../sys/class/" . $class . ".php";
    if (file_exists($filename)) 
    {
        include_once $filename;
    }

}
?>
